Skip to content

GH-45304: [C++][S3] Workaround compatibility issue between AWS SDK and MinIO - #45310

Merged
pitrou merged 2 commits into
apache:mainfrom
pitrou:gh45304-aws-minio-chunked
Jan 22, 2025
Merged

pitrou merged 2 commits into
apache:mainfrom
pitrou:gh45304-aws-minio-chunked

Conversation

@pitrou

@pitrou pitrou commented Jan 20, 2025 •

Copy link
Copy Markdown
Member

Rationale for this change

Some AWS SDK versions have faulty chunked encoding when the body is 0 bytes:
aws/aws-sdk-cpp#3259

What changes are included in this PR?

Work around faulty chunked encoding implementation by only setting a body stream if non-empty.

Are these changes tested?

Locally for now, but will be picked by CI (and conda-forge) at some point.

Are there any user-facing changes?

No.

@pitrou

pitrou commented Jan 20, 2025

Copy link
Copy Markdown
Member Author

I need to report this issue upstream.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #45304 has been automatically assigned in GitHub to PR creator.

@pitrou

pitrou commented Jan 20, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g cpp -g python

@github-actions

This comment was marked as outdated.

@pitrou
pitrou force-pushed the gh45304-aws-minio-chunked branch from 89635cb to 62b1f21 Compare January 20, 2025 12:30
@pitrou

pitrou commented Jan 20, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g cpp -g python

@github-actions

Copy link
Copy Markdown

Revision: 62b1f218f593d9ecca6d9ac008aa37e1ab972ffd

Submitted crossbow builds: ursacomputing/crossbow @ actions-03d11b8bfe

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp-ubuntu-20.04-cuda-11.2.2 GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@pitrou
pitrou force-pushed the gh45304-aws-minio-chunked branch from 62b1f21 to 20d3577 Compare January 20, 2025 12:56
@pitrou

pitrou commented Jan 20, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g cpp -g python

@github-actions

Copy link
Copy Markdown

Revision: 20d3577f92b597b79ce9fc330a93a96601432142

Submitted crossbow builds: ursacomputing/crossbow @ actions-7c6cbeaabc

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp-ubuntu-20.04-cuda-11.2.2 GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@pitrou
pitrou marked this pull request as ready for review January 20, 2025 13:30
@pitrou
pitrou requested review from felipecrv and kou January 20, 2025 13:31
@kou kou changed the title GH-45304: [C++][S3] Workaround compatibility issue between AWS SDK and Minio GH-45304: [C++][S3] Workaround compatibility issue between AWS SDK and MinIO Jan 21, 2025

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread cpp/src/arrow/filesystem/s3fs.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment that we can remove this workaround when we require aws-sdk-cpp 1.11.489 or later?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done. Thanks for the suggestion.

@pitrou
pitrou force-pushed the gh45304-aws-minio-chunked branch from 20d3577 to b150429 Compare January 22, 2025 08:13
@pitrou
pitrou merged commit 12f6265 into apache:main Jan 22, 2025
@pitrou
pitrou deleted the gh45304-aws-minio-chunked branch January 22, 2025 16:43
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 12f6265.

There was 1 benchmark result indicating a performance regression:

The full Conbench report has more details. It also includes information about 20 possible false positives for unstable benchmarks that are known to sometimes produce them.

@pitrou

pitrou commented Jan 23, 2025

Copy link
Copy Markdown
Member Author

@amoeba This is also a candidate for 19.0.1.

@amoeba amoeba modified the milestone: 19.0.1 Jan 23, 2025
@amoeba

amoeba commented Jan 23, 2025

Copy link
Copy Markdown
Member

Thanks @pitrou. I moved #45304 into 19.0.1.

amoeba pushed a commit that referenced this pull request Jan 31, 2025
…d MinIO (#45310)

### Rationale for this change

Some AWS SDK versions have faulty chunked encoding when the body is 0 bytes:
aws/aws-sdk-cpp#3259

### What changes are included in this PR?

Work around faulty chunked encoding implementation by only setting a body stream if non-empty.

### Are these changes tested?

Locally for now, but will be picked by CI (and conda-forge) at some point.

### Are there any user-facing changes?

No.

* GitHub Issue: #45304

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
amoeba pushed a commit that referenced this pull request Jan 31, 2025
…d MinIO (#45310)

### Rationale for this change

Some AWS SDK versions have faulty chunked encoding when the body is 0 bytes:
aws/aws-sdk-cpp#3259

### What changes are included in this PR?

Work around faulty chunked encoding implementation by only setting a body stream if non-empty.

### Are these changes tested?

Locally for now, but will be picked by CI (and conda-forge) at some point.

### Are there any user-facing changes?

No.

* GitHub Issue: #45304

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants